#include "fps.h"

Fps::Fps()
{
// 	t = Timer::Instance();

	dispevery	= 60;
// 	dispcounter	= 0;
// 	dispsum		= 0.0f;
	currentfps	= 0.0f;
}

void Fps::mark( Timer* t )
{
	if ( t->elapsed > 0.0f )
	{
// 		dispsum += t->bullet_ms;

		if ( t->dispcounter >= dispevery )
		{
			currentfps = 1000.0f / (t->dispsum/t->dispcounter);
/*			cerr << "FPS: " << currentfps << endl;*/
			t->dispcounter = 0;
			t->dispsum = 0.0f;
		}
	}
}

Fps::~Fps()
{
}
